package org.filecollector.msgcontroller;

import org.filecollector.msgcontroller.listener.ListenerFactory;
import org.filecollector.msgcontroller.writer.WriterFactory;

import java.io.InputStream;
import java.io.OutputStream;

public abstract class MSGControllerFactory {

    public static MSGController getStandardStreamController() {
        return new MSGControllerClass(
                ListenerFactory.produceSystemIn(),
                WriterFactory.produceSystemOut()
        );
    }

    public static MSGController getByStreams(InputStream is, OutputStream os) {
        return new MSGControllerClass(
                ListenerFactory.produceInputStream(is),
                WriterFactory.produceOutputStream(os)
        );
    }
}
